<template>
    <BasicPopup v-bind="$attrs" @register="registerPopup" :title="title" showOkBtn :showContinueBtn="showContinueBtn"
        destroyOnClose :continueText="continueText" cancelText="取消" okText="确定" @ok="handleSubmit(0)"
        @continue="handleSubmit(1)" :closeFunc="onClose">
        <template #insertFooter>
            <a-space :size="10" v-if="dataForm.id" class="float-left">
                <a-button :disabled="getPrevDisabled" @click="handlePrev">上一条</a-button>
                <a-button :disabled="getNextDisabled" @click="handleNext">下一条</a-button>
            </a-space>
        </template>
        <a-row class="dynamic-form ">
            <a-form class="custom-from" :colon="false" size="default" layout="horizontal" labelAlign="right"
                :labelCol="{ style: { width: '100px' } }" :model="dataForm" :rules="dataRule" ref="formRef">
                <a-row :gutter="15">
                    <!-- 具体表单 -->
                    <a-col :span="24" class="ant-col-item custom-title">
                        <a-form-item>
                            <JnpfGroupTitle contentPosition="left" content="项目初审">
                            </JnpfGroupTitle>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12" class="ant-col-item" v-if="hasFormP('projectName')">
                        <a-form-item name="projectName">
                            <template #label>项目名称</template>
                            <JnpfInput v-model:value="dataForm.projectName" @change="changeData('projectName', -1)"
                                placeholder="请输入" :allowClear='true' :style='{ "width": "100%" }'
                                :maskConfig="maskConfig.projectName" :showCount="false">
                            </JnpfInput>
                        </a-form-item>
                    </a-col>
                    <a-col :span="8" class="ant-col-item" v-if="hasFormP('companyId')">
                        <a-form-item name="companyId">
                            <template #label>投资标的</template>
                            <JnpfSelect v-model:value="dataForm.companyId" @click="getCompanyList"
                                @change="changeData('companyId', -1)" placeholder="请选择"
                                :templateJson="state.interfaceRes.companyId" :allowClear='true'
                                :style='{ "width": "100%" }' :showSearch='true' :options="optionsObj.companyIdOptions"
                                :fieldNames="optionsObj.companyIdProps">
                            </JnpfSelect>
                        </a-form-item>
                    </a-col>
                    <a-col :span="4" class="ant-col-item">
                        <a-form-item>
                            <JnpfButton align="left" buttonText="新增标的" @click="jumpTo">
                            </JnpfButton>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12" class="ant-col-item" v-if="hasFormP('projectType')">
                        <a-form-item name="projectType">
                            <template #label>项目类型</template>
                            <JnpfSelect v-model:value="dataForm.projectType" @change="changeData('projectType', -1)"
                                placeholder="请选择" :templateJson="state.interfaceRes.projectType" :allowClear='true'
                                :style='{ "width": "100%" }' :showSearch='false'
                                :options="optionsObj.projectTypeOptions" :fieldNames="optionsObj.projectTypeProps">
                            </JnpfSelect>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12" class="ant-col-item" v-if="hasFormP('parentProjectId')">
                        <a-form-item name="parentProjectId">
                            <template #label>父项目名称</template>
                            <JnpfTreeSelect v-model:value="dataForm.parentProjectId"
                                @change="changeData('parentProjectId', -1)" placeholder="请选择"
                                :templateJson="state.interfaceRes.parentProjectId" :allowClear='true'
                                :style='{ "width": "100%" }' :showSearch='true'
                                :options="optionsObj.parentProjectIdOptions"
                                :fieldNames="optionsObj.parentProjectIdProps">
                            </JnpfTreeSelect>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12" class="ant-col-item" v-if="hasFormP('partner')">
                        <a-form-item name="partner">
                            <template #label>管理人</template>
                            <JnpfSelect v-model:value="dataForm.partner" @change="changeData('partner', -1)"
                                placeholder="请选择" :templateJson="state.interfaceRes.partner" :allowClear='true'
                                :style='{ "width": "100%" }' :showSearch='true' :multiple="true"
                                :options="optionsObj.partnerOptions" :fieldNames="optionsObj.partnerProps">
                            </JnpfSelect>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12" class="ant-col-item" v-if="hasFormP('manager')">
                        <a-form-item name="manager">
                            <template #label>项目负责人</template>
                            <JnpfUsersSelect v-model:value="dataForm.manager" @change="changeData('manager', -1)"
                                placeholder="请选择" :allowClear='true' :style='{ "width": "100%" }' :multiple="true"
                                selectType="all">
                            </JnpfUsersSelect>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12" class="ant-col-item" v-if="hasFormP('source')">
                        <a-form-item name="source">
                            <template #label>项目来源</template>
                            <JnpfInput v-model:value="dataForm.source" @change="changeData('source', -1)"
                                placeholder="请输入" :allowClear='true' :style='{ "width": "100%" }'
                                :maskConfig="maskConfig.source" :showCount="false">
                            </JnpfInput>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12" class="ant-col-item" v-if="hasFormP('flowType')">
                        <a-form-item name="flowType">
                            <template #label>流程状态</template>
                            <JnpfSelect v-model:value="dataForm.flowType" @change="changeData('flowType', -1)"
                                placeholder="请选择" :templateJson="state.interfaceRes.flowType" :allowClear='true'
                                :style='{ "width": "100%" }' :showSearch='false' :options="optionsObj.flowTypeOptions"
                                :fieldNames="optionsObj.flowTypeProps">
                            </JnpfSelect>
                        </a-form-item>
                    </a-col>
                    <a-col :span="24" class="ant-col-item" v-if="hasFormP('accessory')">
                        <a-form-item name="accessory">
                            <template #label>项目资料附件</template>
                            <JnpfUploadFile v-model:value="dataForm.accessory" @change="changeData('accessory', -1)"
                                :fileSize="500" sizeUnit="MB" :limit="9" pathType="defaultPath" timeFormat="YYYY"
                                buttonText="点击上传">
                            </JnpfUploadFile>
                        </a-form-item>
                    </a-col>
                    <a-col :span="24" class="ant-col-item" v-if="hasFormP('projectProfile')">
                        <a-form-item name="projectProfile">
                            <template #label>项目简介</template>
                            <JnpfTextarea v-model:value="dataForm.projectProfile"
                                @change="changeData('projectProfile', -1)" placeholder="请输入" :allowClear='true'
                                :style='{ "width": "100%" }' :autoSize='{ "minRows": 4, "maxRows": 4 }'
                                :showCount="false">
                            </JnpfTextarea>
                        </a-form-item>
                    </a-col>
                    <a-col :span="24" class="ant-col-item" v-if="hasFormP('preliminaryOpinion')">
                        <a-form-item name="preliminaryOpinion">
                            <template #label>初审意见</template>
                            <JnpfTextarea v-model:value="dataForm.preliminaryOpinion"
                                @change="changeData('preliminaryOpinion', -1)" placeholder="请输入" :allowClear='true'
                                :style='{ "width": "100%" }' :autoSize='{ "minRows": 4, "maxRows": 4 }'
                                :showCount="false">
                            </JnpfTextarea>
                        </a-form-item>
                    </a-col>
                    <a-col :span="24" class="ant-col-item" v-if="hasFormP('preliminaryOpinionFile')">
                        <a-form-item name="preliminaryOpinionFile">
                            <template #label>初审意见附件</template>
                            <JnpfUploadFile v-model:value="dataForm.preliminaryOpinionFile"
                                @change="changeData('preliminaryOpinionFile', -1)" :fileSize="500" sizeUnit="MB"
                                :limit="9" pathType="defaultPath" timeFormat="YYYY" buttonText="点击上传">
                            </JnpfUploadFile>
                        </a-form-item>
                    </a-col>
                    <!-- 表单结束 -->
                </a-row>
            </a-form>
        </a-row>
    </BasicPopup>
</template>
<script lang="ts" setup>
import { create, update, getInfo } from './helper/api';
import { reactive, toRefs, nextTick, ref, unref, computed, toRaw, inject } from 'vue';
import { BasicPopup, usePopup } from '/@/components/Popup';
import { JnpfRelationForm } from '/@/components/Jnpf';
import { useMessage } from '/@/hooks/web/useMessage';
import { useUserStore } from '/@/store/modules/user';
import type { FormInstance } from 'ant-design-vue';
import { thousandsFormat, getDateTimeUnit, getTimeUnit } from '/@/utils/jnpf';
import { getDictionaryDataSelector } from '/@/api/systemData/dictionary';
import { getDataInterfaceRes } from '/@/api/systemData/dataInterface';
import dayjs from 'dayjs';
// 表单权限
import { usePermission } from '/@/hooks/web/usePermission';
import { cloneDeep } from 'lodash-es';
import { buildUUID } from '/@/utils/uuid';
import { CaretRightOutlined } from '@ant-design/icons-vue';


interface State {
    dataForm: any;
    tableRows: any;
    dataRule: any;
    optionsObj: any;
    childIndex: any;
    isEdit: any;
    interfaceRes: any;
    //可选范围默认值
    ableAll: any;
    //掩码配置
    maskConfig: any;
    //定位属性
    locationScope: any;

    title: string;
    continueText: string; allList: any[];
    currIndex: number;
    isContinue: boolean;
    submitType: number;
    showContinueBtn: boolean;
}

const emit = defineEmits(['reload']);
const getLeftTreeActiveInfo: (() => any) | null = inject('getLeftTreeActiveInfo', null);
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
const { createMessage, createConfirm } = useMessage();
// const [registerModal, { openModal, setModalProps }] = useModal();
const [registerPopup, { openPopup, setPopupProps }] = usePopup();
const formRef = ref<FormInstance>();
const state = reactive<State>({
    dataForm: {
        projectName: undefined,
        companyId: '',
        projectType: '',
        parentProjectId: '',
        partner: [],
        manager: [],
        source: undefined,
        flowType: '566238029484664261',
        accessory: [],
        projectProfile: undefined,
        preliminaryOpinion: undefined,
        preliminaryOpinionFile: [],
        processNumber: undefined,
        createdUserId: '',
        createdTime: '',
        lastModifiedUserId: '',
        lastModifiedTime: '',
    },

    tableRows: {
    },

    dataRule: {
        projectName: [
            {
                required: true,
                message: '不能为空',
                trigger: 'blur'
            },
        ],
        companyId: [
            {
                required: true,
                message: '请至少选择一个',
                trigger: 'change'
            },
        ],
        projectType: [
            {
                required: true,
                message: '请至少选择一个',
                trigger: 'change'
            },
        ],
        flowType: [
            {
                required: true,
                message: '请至少选择一个',
                trigger: 'change'
            },
        ],
    },

    optionsObj: {
        companyIdOptions: [],
        companyIdProps: { "label": "company_name", "value": "company_id" },
        projectTypeOptions: [],
        projectTypeProps: { "label": "fullName", "value": "id" },
        parentProjectIdOptions: [],
        parentProjectIdProps: { "label": "project_name", "value": "project_id", "children": "children" },
        partnerOptions: [],
        partnerProps: { "label": "manager_name", "value": "manager_id" },
        flowTypeOptions: [],
        flowTypeProps: { "label": "fullName", "value": "id" },
    },

    childIndex: -1,
    isEdit: false,
    interfaceRes: { "createdUserId": [], "lastModifiedTime": [], "manager": [], "projectType": [], "processNumber": [], "projectProfile": [], "source": [], "preliminaryOpinionFile": [], "companyId": [], "partner": [], "parentProjectId": [], "preliminaryOpinion": [], "lastModifiedUserId": [], "createdTime": [], "projectName": [], "accessory": [], "flowType": [] },
    //可选范围默认值
    ableAll: {
    },

    //掩码配置
    maskConfig: {
        projectName: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
        source: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
    },

    //定位属性
    locationScope: {
    },


    title: "",
    continueText: "", allList: [],
    currIndex: 0,
    isContinue: false,
    submitType: 0,
    showContinueBtn: true,
});
const { title, continueText, showContinueBtn, dataRule, dataForm, optionsObj, ableAll, maskConfig } = toRefs(state);

const getPrevDisabled = computed(() => state.currIndex === 0);
const getNextDisabled = computed(() => state.currIndex === state.allList.length - 1);
// 表单权限
const { hasFormP } = usePermission();

defineExpose({ init });

function init(data) {
    state.isContinue = false;
    state.title = !data.id ? '新增' : '编辑';
    state.continueText = !data.id ? '确定并新增' : '确定并继续'; setFormProps({ continueLoading: false });
    state.dataForm.id = data.id;
    openPopup();
    state.allList = data.allList;
    state.currIndex = state.allList.length && data.id ? state.allList.findIndex((item) => item.id === data.id) : 0;
    nextTick(() => {
        getForm().resetFields();
        setTimeout(initData, 0);
    });
}
function initData() {
    changeLoading(true);
    if (state.dataForm.id) {
        getData(state.dataForm.id);
    } else {
        //初始化options
        getcompanyIdOptions();
        getprojectTypeOptions();
        getparentProjectIdOptions();
        getpartnerOptions();
        getflowTypeOptions();

        // 设置默认值
        state.dataForm = {
            projectName: undefined,
            companyId: '',
            projectType: '',
            parentProjectId: '',
            partner: [],
            manager: [],
            source: undefined,
            flowType: '566238029484664261',
            accessory: [],
            projectProfile: undefined,
            preliminaryOpinion: undefined,
            preliminaryOpinionFile: [],
            processNumber: undefined,
            createdUserId: '',
            createdTime: '',
            lastModifiedUserId: '',
            lastModifiedTime: '',
        };
        if (getLeftTreeActiveInfo) state.dataForm = { ...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
        state.childIndex = -1;
        changeLoading(false);
    }
}
// 跳转到企业数据
function jumpTo(){
    window.open('http://172.30.42.99:3100/model/company' ,'_blank')
    // window.open('http://localhost:3100/model/company' ,'_blank')
}
// 重新请求企业列表
function getCompanyList() {
    getcompanyIdOptions()
}
function getForm() {
    const form = unref(formRef);
    if (!form) {
        throw new Error('form is null!');
    }
    return form;
}
function getData(id) {
    getInfo(id).then((res) => {
        state.dataForm = res.data || {};
        getcompanyIdOptions();
        getprojectTypeOptions();
        getparentProjectIdOptions();
        getpartnerOptions();
        getflowTypeOptions();

        state.childIndex = -1;
        changeLoading(false);
    });
}
async function handleSubmit(type) {
    try {
        const values = await getForm()?.validate();
        if (!values) return;

        state.submitType = type;
        state.submitType === 1 ? setFormProps({ continueLoading: true }) : setFormProps({ confirmLoading: true });
        const formMethod = state.dataForm.id ? update : create;
        formMethod(state.dataForm)
            .then((res) => {
                createMessage.success(res.msg);
                state.submitType === 1 ? setFormProps({ continueLoading: false }) : setFormProps({ confirmLoading: false });
                if (state.submitType == 1) {
                    initData();
                    state.isContinue = true;
                } else {
                    setFormProps({ visible: false });
                    emit('reload');
                }
            })
            .catch(() => {
                state.submitType === 1 ? setFormProps({ continueLoading: false }) : setFormProps({ confirmLoading: false });
            });
    } catch (_) { }
}
function handlePrev() {
    state.currIndex--;
    handleGetNewInfo();
}
function handleNext() {
    state.currIndex++;
    handleGetNewInfo();
}
function handleGetNewInfo() {
    changeLoading(true);
    getForm().resetFields();
    const id = state.allList[state.currIndex].id;
    getData(id);
}
function setFormProps(data) {
    setPopupProps(data);
}
function changeLoading(loading) {
    setPopupProps({ loading });
}
async function onClose() {
    if (state.isContinue) emit('reload');
    return true;
}

function changeData(model, index) {
    state.isEdit = false
    state.childIndex = index
    for (let key in state.interfaceRes) {
        if (key != model) {
            let faceReList = state.interfaceRes[key]
            for (let i = 0; i < faceReList.length; i++) {
                let relationField = faceReList[i].relationField;
                if (relationField) {
                    let modelAll = relationField.split('-');
                    let faceMode = '';
                    let faceMode2 = modelAll.length == 2 ? modelAll[0].substring(0, modelAll[0].length - 4) + modelAll[1] : ""
                    for (let i = 0; i < modelAll.length; i++) {
                        faceMode += modelAll[i];
                    }
                    if (faceMode == model || faceMode2 == model) {
                        let options = 'get' + key + 'Options';
                        eval(options)(true);
                        changeData(key, index)
                    }
                }
            }
        }
    }
}
function changeDataFormData(type, data, model, index, defaultValue) {
    if (!state.isEdit) {
        if (type == 2) {
            for (let i = 0; i < state.dataForm[data].length; i++) {
                if (index == -1) {
                    state.dataForm[data][i][model] = defaultValue
                } else if (index == i) {
                    state.dataForm[data][i][model] = defaultValue
                }
            }
        } else {
            state.dataForm[data] = defaultValue
        }
    }
}
//数据选项--远端数据初始化方法
function getcompanyIdOptions(isClear = false) {
    const index = state.childIndex
    let templateJsonList = JSON.parse(JSON.stringify(state.interfaceRes.companyId))
    for (let i = 0; i < templateJsonList.length; i++) {
        let json = templateJsonList[i];
        if (json.relationField && json.sourceType == 1) {
            let relationFieldAll = json.relationField.split("-");
            let val = json.defaultValue;
            if (relationFieldAll.length > 1 && index > -1) {
                if (relationFieldAll[0].endsWith("List")) {
                    val = state.dataForm[relationFieldAll[0]] && state.dataForm[relationFieldAll[0]].length ?
                        state.dataForm[relationFieldAll[0]][index][relationFieldAll[1]] : ''
                } else {
                    val = state.dataForm[relationFieldAll[0] + 'List'] && state.dataForm[relationFieldAll[0] + 'List'].length ?
                        state.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
                }
            } else {
                val = state.dataForm[relationFieldAll]
            }
            json.defaultValue = val ? val : '';
        }
    }
    let template = {
        paramList: templateJsonList
    }
    getDataInterfaceRes('562985438130740677', template).then(res => {
        let data = res.data
        state.optionsObj.companyIdOptions = data
        if (index == -1) return
        if (isClear) {
            changeDataFormData(1, 'List', 'companyId', index, '')
        }
    })
}
//数据选项--数据字典初始化方法
function getprojectTypeOptions() {
    getDictionaryDataSelector('566179108061454021').then(res => {
        state.optionsObj.projectTypeOptions = res.data.list
    })
}
//数据选项--远端数据初始化方法
function getparentProjectIdOptions(isClear = false) {
    const index = state.childIndex
    let templateJsonList = JSON.parse(JSON.stringify(state.interfaceRes.parentProjectId))
    for (let i = 0; i < templateJsonList.length; i++) {
        let json = templateJsonList[i];
        if (json.relationField && json.sourceType == 1) {
            let relationFieldAll = json.relationField.split("-");
            let val = json.defaultValue;
            if (relationFieldAll.length > 1 && index > -1) {
                if (relationFieldAll[0].endsWith("List")) {
                    val = state.dataForm[relationFieldAll[0]] && state.dataForm[relationFieldAll[0]].length ?
                        state.dataForm[relationFieldAll[0]][index][relationFieldAll[1]] : ''
                } else {
                    val = state.dataForm[relationFieldAll[0] + 'List'] && state.dataForm[relationFieldAll[0] + 'List'].length ?
                        state.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
                }
            } else {
                val = state.dataForm[relationFieldAll]
            }
            json.defaultValue = val ? val : '';
        }
    }
    let template = {
        paramList: templateJsonList
    }
    getDataInterfaceRes('572765913539946757', template).then(res => {
        let data = res.data
        state.optionsObj.parentProjectIdOptions = data
        if (index == -1) return
        if (isClear) {
            changeDataFormData(1, 'List', 'parentProjectId', index, '')
        }
    })
}
//数据选项--远端数据初始化方法
function getpartnerOptions(isClear = false) {
    const index = state.childIndex
    let templateJsonList = JSON.parse(JSON.stringify(state.interfaceRes.partner))
    for (let i = 0; i < templateJsonList.length; i++) {
        let json = templateJsonList[i];
        if (json.relationField && json.sourceType == 1) {
            let relationFieldAll = json.relationField.split("-");
            let val = json.defaultValue;
            if (relationFieldAll.length > 1 && index > -1) {
                if (relationFieldAll[0].endsWith("List")) {
                    val = state.dataForm[relationFieldAll[0]] && state.dataForm[relationFieldAll[0]].length ?
                        state.dataForm[relationFieldAll[0]][index][relationFieldAll[1]] : ''
                } else {
                    val = state.dataForm[relationFieldAll[0] + 'List'] && state.dataForm[relationFieldAll[0] + 'List'].length ?
                        state.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
                }
            } else {
                val = state.dataForm[relationFieldAll]
            }
            json.defaultValue = val ? val : '';
        }
    }
    let template = {
        paramList: templateJsonList
    }
    getDataInterfaceRes('568352480199452101', template).then(res => {
        let data = res.data
        state.optionsObj.partnerOptions = data
        if (index == -1) return
        if (isClear) {
            changeDataFormData(1, 'List', 'partner', index, '')
        }
    })
}
//数据选项--数据字典初始化方法
function getflowTypeOptions() {
    getDictionaryDataSelector('566235804473501125').then(res => {
        state.optionsObj.flowTypeOptions = res.data.list
    })
}
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
    let timeDataValue: any = null;
    let timeValue = Number(timeValueData);
    if (timeRule) {
        if (timeType == 1) {
            timeDataValue = timeValue;
        } else if (timeType == 2) {
            timeDataValue = dataValue;
        } else if (timeType == 3) {
            timeDataValue = new Date().getTime();
        } else if (timeType == 4 || timeType == 5) {
            const type = getTimeUnit(timeTarget);
            const method = timeType == 4 ? 'subtract' : 'add';
            timeDataValue = dayjs()[method](timeValue, type).valueOf();
        }
    }
    return timeDataValue;
}
function getRelationTime(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
    let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType;
    let timeDataValue: any = null;
    if (timeRule) {
        if (timeType == 1) {
            timeDataValue = timeValue || '00:00:00';
            if (timeDataValue.split(':').length == 3) {
                timeDataValue = timeDataValue;
            } else {
                timeDataValue = timeDataValue + ':00';
            }
        } else if (timeType == 2) {
            timeDataValue = dataValue;
        } else if (timeType == 3) {
            timeDataValue = dayjs().format(format);
        } else if (timeType == 4 || timeType == 5) {
            const type = getTimeUnit(timeTarget + 3);
            const method = timeType == 4 ? 'subtract' : 'add';
            timeDataValue = dayjs()[method](timeValue, type).format(format);
        }
    }
    return timeDataValue;
}
</script>

<style lang="css">
/*********分组标题样式**********/
.custom-title .jnpf-basic-caption{
    position: relative;
    padding: 0 0 0 10px;
    margin-left: 8px;
    
}

.custom-title .jnpf-basic-caption::before {
    content: '';
    display: inline-block;
    height: 60%;
    width: 4px;
    background-color: #1890ff;
    /* 竖线的颜色 */
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.custom-title .jnpf-basic-title {
    font-weight: bold !important;
}

/************表单项样式****************/
.custom-from .ant-form-item-label > label{
    color: #999;
}

/**无标签页时表单标题样式**/
.custom-from .ant-col-item:not(:nth-child(1)) {
    padding-left: 38px !important;
}

.ant-col-item {
    padding-left: 14px !important;
}
/**有标签页时表单标题样式**/
/* .custom-from-label {
    padding-left: 30px !important;
} */

/*******标签页********/
/* .custom-ant-tabs {
    padding: 0 20px;
} */

.ant-tabs {
    padding: 0 30px;
}

</style>
